import { _decorator, Component, Node } from 'cc';
import { Fish } from './Fish';
import { Data } from './Data';
const { ccclass, property } = _decorator;

@ccclass('FishLoad')
/**
 * 鱼层
 */
export class FishLoad extends Component {

    /**
     * 初始化
     */
    public Init() {
        for (let i = 0; i < this.node.children.length; i++) {
            let fishindex: number = Data.ReturnFishColor();
            this.node.children[i].getComponent(Fish).UpdateFish(fishindex);
            this.node.children[i].getComponent(Fish).PlayShowAni(i);
        }
    }


}


